package ch9.thread3;

public class DaemonThread extends Thread {
	@Override
	public void run() {
		while (true) {
			System.out.println("后台线程");
		}
	}

	public static void main(String[] args) {
		DaemonThread t = new DaemonThread();
		t.setDaemon(true);// 守护线程
		t.start();
		try {
			Thread.sleep(200);
		} catch (InterruptedException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
	}
}
